core: Another GLib 2.30 build fix
authorColin Walters <walters@verbum.org>
Mon, 14 Nov 2011 20:31:53 +0000 (15:31 -0500)
committerColin Walters <walters@verbum.org>
Mon, 14 Nov 2011 20:31:53 +0000 (15:31 -0500)
libostree/ostree-repo.c

index 0d345312d639775cb9731aecc654ec44032d1dee..2bdb56dcce4e2d7feb802550b5bea8cfe9565928 100644 (file)
@@ -442,8 +442,10 @@ ostree_repo_write_config (OstreeRepo *self,
   if (!g_file_set_contents (priv->config_path, data, len, error))
     goto out;
   
-  g_key_file_unref (priv->config);
-  priv->config = g_key_file_ref (new_config);
+  g_key_file_free (priv->config);
+  priv->config = g_key_file_new ();
+  if (!g_key_file_load_from_data (priv->config, data, len, 0, error))
+    goto out;
 
   ret = TRUE;
  out: